#ifndef RGUI_VEC3_HPP
#define RGUI_VEC3_HPP

namespace rgui
{

class vec3b
{
public:
	vec3b(unsigned char x = 0, unsigned char y = 0, unsigned char z = 0){this->x = x; this->y = y; this->z = z;}
	vec3b(const vec3b &other){x = other.x; y = other.y; z = other.z;}
	void operator=(const vec3b &other){x = other.x; y = other.y; z = other.z;}
	vec3b operator/(const unsigned char value){return vec3b(x / value, y / value, z / value);}
	void operator/=(const unsigned char value){x /= value; y /= value; z /= value;}
	union{unsigned char x, r, width;};
	union{unsigned char y, g, height;};
	union{unsigned char z, b, depth;};
};

class vec3i
{
public:
	vec3i(int x = 0, int y = 0, int z = 0){this->x = x; this->y = y; this->z = z;}
	vec3i(const vec3i &other){x = other.x; y = other.y; z = other.z;}
	void operator=(const vec3i &other){x = other.x; y = other.y; z = other.z;}
	vec3i operator/(const int value){return vec3i(x / value, y / value, z / value);}
	void operator/=(const int value){x /= value; y /= value; z /= value;}
	union{int x, r, width;};
	union{int y, g, height;};
	union{int z, b, depth;};
};

class vec3ui
{
public:
	vec3ui(unsigned int x = 0U, unsigned int y = 0U, unsigned int z = 0U){this->x = x; this->y = y; this->z = z;}
	vec3ui(const vec3ui &other){x = other.x; y = other.y; z = other.z;}
	void operator=(const vec3ui &other){x = other.x; y = other.y; z = other.z;}
	vec3ui operator/(const unsigned int value){return vec3ui(x / value, y / value, z / value);}
	void operator/=(const unsigned int value){x /= value; y /= value; z /= value;}
	union{unsigned int x, r, width;};
	union{unsigned int y, g, height;};
	union{unsigned int z, b, depth;};
};

class vec3f
{
public:
	vec3f(float x = 0.0f, float y = 0.0f, float z = 0.0f){this->x = x; this->y = y; this->z = z;}
	vec3f(const vec3f &other){x = other.x; y = other.y; z = other.z;}
	void operator=(const vec3f &other){x = other.x; y = other.y; z = other.z;}
	vec3f operator/(const float value){return vec3f(x / value, y / value, z / value);}
	void operator/=(const float value){x /= value; y /= value; z /= value;}
	union{float x, r, width;};
	union{float y, g, height;};
	union{float z, b, depth;};
};

class vec3d
{
public:
	vec3d(double x = 0.0, double y = 0.0, double z = 0.0){this->x = x; this->y = y; this->z = z;}
	vec3d(const vec3d &other){x = other.x; y = other.y; z = other.z;}
	void operator=(const vec3d &other){x = other.x; y = other.y; z = other.z;}
	vec3d operator/(const double value){return vec3d(x / value, y / value, z / value);}
	void operator/=(const double value){x /= value; y /= value; z /= value;}
	union{double x, r, width;};
	union{double y, g, height;};
	union{double z, b, depth;};
};

class vec3l
{
public:
	vec3l(long x = 0L, long y = 0L, long z = 0L){this->x = x; this->y = y; this->z = z;}
	vec3l(const vec3l &other){x = other.x; y = other.y; z = other.z;}
	void operator=(const vec3l &other){x = other.x; y = other.y; z = other.z;}
	vec3l operator/(const long value){return vec3l(x / value, y / value, z / value);}
	void operator/=(const long value){x /= value; y /= value; z /= value;}
	union{long x, r, width;};
	union{long y, g, height;};
	union{long z, b, depth;};
};

class vec3ul
{
public:
	vec3ul(unsigned long x = 0UL, unsigned long y = 0UL, unsigned long z = 0UL){this->x = x; this->y = y; this->z = z;}
	vec3ul(const vec3ul &other){x = other.x; y = other.y; z = other.z;}
	void operator=(const vec3ul &other){x = other.x; y = other.y; z = other.z;}
	vec3ul operator/(const unsigned long value){return vec3ul(x / value, y / value, z / value);}
	void operator/=(const unsigned long value){x /= value; y /= value; z /= value;}
	union{unsigned long x, r, width;};
	union{unsigned long y, g, height;};
	union{unsigned long z, b, depth;};
};

}

#endif